package com.syni.mdd.sjb.common.datatreaure.entity.vo.rp.dataBankBusiness;

import com.syni.mdd.sjb.common.component.utils.common.utils.ArithUtil;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DataBankAnalysisOrderRpVo {
    //今日客单价
    private Double todayUnitPrice = 0d;

    public void setTodayUnitPrice(Double todayUnitPrice) {
        this.todayUnitPrice = ArithUtil.round(todayUnitPrice,2);
    }

    //今日订单量
    private Integer ordersTodayNum = 0;
    //订单与客单
    private CusOrder cusOrder = new CusOrder();
    @Data
    public static class CusOrder{
        //昨日订单量
        private Integer yesOrderNum = 0;
        //昨日客单量
        private Double yesCusOrderPrice = 0d;
        //7日订单量
        private Integer sevenOrderNum = 0;
        //7日客单价
        private Double sevenCusOrderPrice = 0d;
        //30日订单量
        private Integer thirtyOrderNum = 0;
        //30日客单价
        private Double thirtyCusOrderPrice = 0d;
        //半年订单量
        private Integer halfYearOrderNum = 0;
        //半年客单价
        private Double halfYearCusOrderPrice = 0d;
        //昨日订单
        private List<CusOrderLineData> yesOrderLineData = new ArrayList<>();
        //7日订单
        private List<CusOrderLineData> sevenOrderLineData = new ArrayList<>();
        //30日订单
        private List<CusOrderLineData> thirtyOrderLineData = new ArrayList<>();
        //半年订单
        private List<CusOrderLineData> halfYearOrderLineData = new ArrayList<>();
//        //昨日客单
//        private List<LineData> yesCusLineData = new ArrayList<>();
//        //7日客单
//        private List<LineData> sevenCusLineData = new ArrayList<>();
//        //30日客单
//        private List<LineData> thirtyCusLineData = new ArrayList<>();
//        //半年客单
//        private List<LineData> halfYearCusLineData = new ArrayList<>();
        //订单与客单价的经营建议
        private String orderCustomerBusinessAdvice = "暂无建议";;
    }

    @Data
    public static class CusOrderLineData{
        private String title = "";
        private Double value1 = 0d;
        private Integer value2 = 0;
        private String smallTitle = "";
    }

    //订单配送方式
    private OrderDeliveryMethod deliveryMethod = new OrderDeliveryMethod();
    @Data
    public static class OrderDeliveryMethod{
        private List<PieData> yesDeliveryMethodData = new ArrayList<>();
        private List<PieData> sevenDeliveryMethodData = new ArrayList<>();
        private List<PieData> thirtyDeliveryMethodData = new ArrayList<>();
        private List<PieData> halfYearDeliveryMethodData = new ArrayList<>();
        //订单配送方式的经营建议
        private String deliveryMethodBusinessAdvice = "暂无建议";
    }

    //翻台率
    private TurnoverRate turnoverRate = new TurnoverRate();
    @Data
    public static class TurnoverRate{
        private List<LineData> yesTurnoverRateData = new ArrayList<>();
        private List<LineData> sevenTurnoverRateData = new ArrayList<>();
        private List<LineData> thirtyTurnoverRateData = new ArrayList<>();
        private List<LineData> halfYearTurnoverRateData = new ArrayList<>();
        //翻台率的经营建议
        private String turnoverRateBusinessAdvice = "暂无建议";
    }


    //用餐人数分布
    private DistributionDiningPopulation diningPopulation = new DistributionDiningPopulation();
    @Data
    public static class DistributionDiningPopulation{
        private List<PieData> yesPieData = new ArrayList<>();
        private List<PieData> sevenPieData = new ArrayList<>();
        private List<PieData> thirtyPieData = new ArrayList<>();
        private List<PieData> halfYearPieData = new ArrayList<>();
        //用餐人数分布的经营建议
        private String diningPopulationBusinessAdvice = "暂无建议";
    }

    //订单完成时间
    private OrderCompletionTime orderCompletionTime = new OrderCompletionTime();
    @Data
    public static class OrderCompletionTime{
        private List<PieData> yesOrderCompletionData = new ArrayList<>();
        private List<PieData> sevenOrderCompletionData = new ArrayList<>();
        private List<PieData> thirtyOrderCompletionData = new ArrayList<>();
        private List<PieData> halfYearOrderCompletionData = new ArrayList<>();
        //用餐人数分布的经营建议
        private String orderCompletionTimeBusinessAdvice = "暂无建议";
    }

    //配送距离
    private DistributionDistance distributionDistance = new DistributionDistance();
    @Data
    public static class DistributionDistance{
        private List<PieData> yesDistributionDistanceData = new ArrayList<>();
        private List<PieData> sevenDistributionDistanceData = new ArrayList<>();
        private List<PieData> thirtyDistributionDistanceData = new ArrayList<>();
        private List<PieData> halfYearDistributionDistanceData = new ArrayList<>();
        //用餐人数分布的经营建议
        private String distributionDistanceBusinessAdvice = "暂无建议";
    }


}
